
/**
 * @desc 部门信息
 */
export type DeptInfo = {
  parentId: string ;
  deptName: string;
  leader: string;
  leaderId: string;
  [props:string]:any
};

/**
 * @desc 请求部门成员参数
 */
export type PersonnelListParams = {
  deptId: string;
  name?: string;
  current?: number;
  size?: number;
  orderByColumn?: string;
  isAsc?: string;
};

/**
 * @desc 部门成员信息
 */

export type PersonnelRoles = {
  roleId: string;
  roleName: string;
  dataScope: string;
};
export type PersonnelItem = {
  userId: string;
  tenantId: string;
  tenantTypeCode: string;
  account: string;
  nickName: string;
  userType: string;
  mobile: string;
  sex: 0 | 1 | 2;
  avatar: string;
  status: boolean;
  isDefaultPassword: boolean;
  roles: PersonnelRoles[];
};
export type PersonnelListData = {
  current: number;
  total: number;
  size: number;
  list: PersonnelItem[];
};

export interface SectortreeItem{
  id:string
  tenantId:string
  deptId:string
  deptName:string
  parentId:string
  orderNum:number
  leader:string
  leaderId:string
  status:boolean
  createTime:string
  updateTime:string
  children:SectortreeItem[]
}

/**
 * @desc 部门树
 */
export type  DeptTree = {
  id: string
  tenantId: string
  deptId: string
  deptName: string
  parentId: string
  ancestors: string
  orderNum: string
  status: boolean
  leader: string
  leaderId: string
  children: DeptTree[]
}

/**
 * @desc 用户部门详情
 */
export type UserDeptInfo = {
  deptId: string
  deptName:string
  parentId: string
  isSelect: boolean
  children: UserDeptInfo[]
}
export  type  UserDeptItem = {
  deptId:string;
  deptName: string;
  isMain: boolean;
}
export type UserDeptDetail = {
  deptTree: UserDeptInfo[]
  deptList: UserDeptItem[]
}
